


package androidchat.com.view;

import com.androidchat.R;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.*;

import android.view.animation.Animation.AnimationListener;

import android.widget.ImageView;

public class LogoActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE); 
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.activity_logo);
		final ImageView loadingIv = (ImageView) this.findViewById(R.id.logo_bg); 
		ScaleAnimation animation=new ScaleAnimation(0.0f,1.0f,0.0f,1.0f);
		animation.setDuration(555);         
		loadingIv.setAnimation(animation);
		animation.setAnimationListener(new AnimationListener(){

			@Override
			public void onAnimationEnd(Animation arg0) {
				// TODO Auto-generated method stub
				Intent it = new Intent(LogoActivity.this, LoginActivity.class);                  
				startActivity(it); 
				finish();
			}

			@Override
			public void onAnimationRepeat(Animation arg0) {
				// TODO Auto-generated method stub
				
			}

			@Override
			public void onAnimationStart(Animation arg0) {
				// TODO Auto-generated method stub
				
			}
			
		});

	
	}
}


